package com.neu.controller;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.neu.domain.Reglevel;
import com.neu.service.ReglevelService;
import com.neu.utils.JsonModel;

@Controller
@RequestMapping("/reglevel")
public class ReglevelController {
	
	@Resource(name="reglevelService")
	private ReglevelService reglevelService;
	
	@ResponseBody
	@RequestMapping("queryLevelById")
	public JsonModel findLevelById(Integer levelid) {
		JsonModel j=new JsonModel();
		//调用service方法获取结果
		Reglevel level=reglevelService.findLevelById(levelid);
		j.setData(level);
		return j;
	}
}
